home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / comm2 / netecho.rdm < prev    next >
Text File  |  1996-02-22  |  1KB  |  42 lines

  1. Short:    Netecho checks if a host is available.
  2. Author:   atte@crash.north.de (Andreas Gelhausen)
  3. Uploader: cosinus@deepthought.north.de (Christian Stelter)
  4. Type:     comm/tcp
  5.  
  6. System requirements:   Kickstart 2.04+ and AmiTCP 4.0+
  7.  
  8.  
  9. Usage
  10. =====
  11.  
  12.    netecho is based on the TCP/IP service 'echo' and it's useful to
  13. check the availability of a certain host within scripts. If the given
  14. host is available, the string 'NETECHO' will be printed and the return
  15. value is set to 0 (RETURN_OK). Otherwise an error message is printed
  16. and the return value is set to 20 (RETURN_FAIL).
  17.  
  18. Usage:
  19.          netecho <hostname>
  20.  
  21. Example:
  22.          netecho crash.north.de
  23.  
  24. Example script 1:
  25.  
  26.          failat 21
  27.          netecho >nil: crash.north.de
  28.          if warn
  29.             echo "crash.north.de is not available!"
  30.          else
  31.             echo "crash is alive! =¦^)"
  32.          endif
  33.  
  34. Example script 2:
  35.  
  36.          failat 21
  37.          if "`netecho crash.north.de`" eq "NETECHO"
  38.             echo "crash is alive! =¦^)"
  39.          else
  40.             echo "crash.north.de is not available!"
  41.          endif
  42.